package com.huabo.contract.mysql.mapper;

import com.huabo.contract.mysql.entity.TblBiPageMySql ;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huabo
 * @since 2022-04-08
 */
public interface TblBiPageMySqlMapper extends BaseMapper<TblBiPageMySql> {

    @Select("select * from TBL_BI_PAGE TBP WHERE 1=1 AND TBP.UNIT=#{orgid} AND TBP.PAGEBODY  is not null AND TBP.TREEID=#{staffid} AND TYPE != 1 order by TBP.SORT")
    List<TblBiPageMySql> findByOrgid(BigDecimal staffid, BigDecimal orgid);

    @Select("select * from TBL_BI_PAGE  WHERE PAGEBODY  is not null and PAGEID in (#{pageid})   order by SORT")
    List<TblBiPageMySql> findBypageid(String pageid);
}
